<div class="container">
  <div class="row">

    <div class="col s12 m9 l10">

      <div id="introduction" class="section scrollspy">
        <h4>Introduction</h4>
        <p class="caption">The tabs structure consists of an unordered list of tabs that have hashes corresponding to tab ids. Then when you click on each tab, only the container with the corresponding tab id will become visible. You can add the class <code class="language-markup">.disabled</code> to make a tab inaccessible. </p>

        <br>
        <h5>Variable Width Tabs<span>Default</span></h5>
        <ul class="tabs tab-demo z-depth-1">
          <li class="tab"><a href="#test16">Test 1</a></li>
          <li class="tab"><a class="active" href="#test17">Test 2</a></li>
          <li class="tab"><a href="#test18">Test 3</a></li>
          <li class="tab"><a href="#test19">Test 4</a></li>
        </ul>
        <div id="test16" class="col s12"><p>Test 1</p></div>
        <div id="test17" class="col s12"><p>Test 2</p></div>
        <div id="test18" class="col s12"><p>Test 3</p></div>
        <div id="test19" class="col s12"><p>Test 4</p></div>

        <br>
        <h5>Fixed Width Tabs<span>Add the <code class="language-markup">.tabs-fixed-width</code> class</span></h5>
        <ul class="tabs tabs-fixed-width tab-demo z-depth-1">
          <li class="tab"><a href="#test1">Test 1</a></li>
          <li class="tab"><a class="active" href="#test2">Test 2</a></li>
          <li class="tab disabled"><a href="#test3">Disabled Tab</a></li>
          <li class="tab"><a href="#test4">Test 4</a></li>
          <li class="tab"><a href="#test0">Test 5</a></li>
        </ul>
        <div id="test1" class="col s12"><p>Test 1</p></div>
        <div id="test2" class="col s12"><p>Test 2</p></div>
        <div id="test3" class="col s12"><p>Test 3</p></div>
        <div id="test4" class="col s12"><p>Test 4</p></div>
        <div id="test0" class="col s12"><p>Test 5</p></div>

        <br>
        <h5>Scrollable Tabs <span>Tabs automatically become scrollable</span></h5>
        <ul class="tabs tab-demo z-depth-1">
          <li class="tab"><a href="#test5">Test 1</a></li>
          <li class="tab"><a class="active" href="#test6">Test 2</a></li>
          <li class="tab"><a href="#test7">Test 4</a></li>
          <li class="tab"><a href="#test8">Test 1</a></li>
          <li class="tab"><a class="active" href="#test9">Test 2</a></li>
          <li class="tab disabled"><a href="#test10">Disabled Tab</a></li>
          <li class="tab"><a href="#test11">Test 4</a></li>
          <li class="tab"><a href="#test12">Test 1</a></li>
          <li class="tab"><a class="active" href="#test13">Test 2</a></li>
          <li class="tab disabled"><a href="#test14">Disabled Tab</a></li>
          <li class="tab"><a href="#test15">Test 4</a></li>
        </ul>
        <div id="test5" class="col s12"><p>Test 5</p></div>
        <div id="test6" class="col s12"><p>Test 6</p></div>
        <div id="test7" class="col s12"><p>Test 7</p></div>
        <div id="test8" class="col s12"><p>Test 8</p></div>
        <div id="test9" class="col s12"><p>Test 9</p></div>
        <div id="test10" class="col s12"><p>Test 10</p></div>
        <div id="test11" class="col s12"><p>Test 11</p></div>
        <div id="test12" class="col s12"><p>Test 12</p></div>
        <div id="test13" class="col s12"><p>Test 13</p></div>
        <div id="test14" class="col s12"><p>Test 14</p></div>
        <div id="test15" class="col s12"><p>Test 15</p></div>
      </div>


      <div id="structure" class="section scrollspy">
        <h4>Tabs HTML Structure</h4>
        <pre><code class="language-markup">
  &lt;div class="row">
    &lt;div class="col s12">
      &lt;ul class="tabs">
        &lt;li class="tab col s3">&lt;a href="#test1">Test 1&lt;/a>&lt;/li>
        &lt;li class="tab col s3">&lt;a class="active" href="#test2">Test 2&lt;/a>&lt;/li>
        &lt;li class="tab col s3 disabled">&lt;a href="#test3">Disabled Tab&lt;/a>&lt;/li>
        &lt;li class="tab col s3">&lt;a href="#test4">Test 4&lt;/a>&lt;/li>
      &lt;/ul>
    &lt;/div>
    &lt;div id="test1" class="col s12">Test 1&lt;/div>
    &lt;div id="test2" class="col s12">Test 2&lt;/div>
    &lt;div id="test3" class="col s12">Test 3&lt;/div>
    &lt;div id="test4" class="col s12">Test 4&lt;/div>
  &lt;/div>
        </code></pre>
      </div>

      <div id="initialization" class="section scrollspy">
        <h4>jQuery Plugin Initialization</h4>
        <p>Tabs are initialized automatically, but if you add tabs dynamically you will have to initialize them like this.</p>
        <pre><code class="language-javascript">
  $(document).ready(function(){
    $('ul.tabs').tabs();
  });
        </code></pre>
      </div>

      <div id="method" class="section scrollspy">
        <h4>jQuery Plugin Methods</h4>
        <p>You can programmatically trigger a tab change with our <code class="language-javascript">select_tab</code> method. You have to input the id of the tab you want to switch to. In the case of our demo it would be either test1, test2, test3, or test4.</p>
        <pre><code class="language-javascript">
  $(document).ready(function(){
    $('ul.tabs').tabs('select_tab', 'tab_id');
  });
        </code></pre>
      </div>


      <div id="options" class="section scrollspy">
        <h4>jQuery Plugin Options</h4>
        <table class="highlight">
          <thead>
            <tr>
                <th>Option Name</th>
                <th>Description</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>onShow</td>
              <td>Execute a callback function when the tab is changed. <br /> The callback provides a parameter which refers to the current tab being shown.</td>
            </tr>
            <tr>
              <td>swipeable</td>
              <td>Set to true to enable swipeable tabs. This also uses the responsiveThreshold option. Default: false</td>
            </tr>
            <tr>
              <td>responsiveThreshold</td>
              <td>The maximum width of the screen, in pixels, where the swipeable functionality initializes. Default: Infinity</td>
            </tr>
          </tbody>
        </table>
      </div>


      <div id="preselecting" class="section scrollspy">
        <h4>Preselecting a tab</h4>
          <p>By default, the first tab is selected. But if this is not what you want, you can preselect a tab by either passing in the hash in the url ex:<code class="language-markup">#test2</code>. Or you can add the class <code class="language-markup">active</code> to the <code class="language-markup">a</code> tag.</p>
        <pre><code class="language-markup col s12">
  &lt;li class="tab col s2">&lt;a class="active" href="#test3">Test 3&lt;/a>&lt;/li>
        </code></pre>
      </div>


      <div id="external" class="section scrollspy">
        <h4>Linking to an External Page</h4>
          <p>By default, Materialize tabs will ignore their default anchor behaviour.  To force a tab to behave as a regular hyperlink, just specify the <code class="language-markup">target</code> property of that link!  A list of <code class="language-markup">target</code> values may be <a href="https://www.w3schools.com/tags/att_a_target.asp">found here</a>.</p>
        <pre><code class="language-markup col s12">
  &lt;li class="tab col s2">
    &lt;a target="_blank" href="https://github.com/Dogfalo/materialize">External link in new window&lt;/a>
  &lt;/li>
  &lt;li class="tab col s2">
    &lt;a target="_self" href="https://github.com/Dogfalo/materialize">External link in same window&lt;/a>
  &lt;/li>
        </code></pre>
      </div>


      <div id="swipeable" class="section scrollspy">
        <h4>Swipeable Tabs</h4>
        <p>By setting the <code class="language-javascript">swipeable</code> option to <code class="language-markup">true</code>, you can enable tabs where you can swipe on touch enabled devices to switch tabs. Make sure you keep the tab content divs in the same wrapping container. You can also set the <code class="language-javascript">responsiveThreshold</code> option to a screen width in pixels where the swipeable functionality will activate.</p>
        <p>Note: This is also touch compatible! Try swiping with your finger to scroll through the carousel.</p>
        <ul id="tabs-swipe-demo" class="tabs">
          <li class="tab col s3"><a href="#test-swipe-1">Test 1</a></li>
          <li class="tab col s3"><a class="active" href="#test-swipe-2">Test 2</a></li>
          <li class="tab col s3"><a href="#test-swipe-3">Test 3</a></li>
        </ul>
        <div id="test-swipe-1" class="col s12 blue">Test 1</div>
        <div id="test-swipe-2" class="col s12 red">Test 2</div>
        <div id="test-swipe-3" class="col s12 green">Test 3</div>

        <pre><code class="language-markup col s12">
  &lt;ul id="tabs-swipe-demo" class="tabs">
    &lt;li class="tab col s3">&lt;a href="#test-swipe-1">Test 1&lt;/a>&lt;/li>
    &lt;li class="tab col s3">&lt;a class="active" href="#test-swipe-2">Test 2&lt;/a>&lt;/li>
    &lt;li class="tab col s3">&lt;a href="#test-swipe-3">Test 3&lt;/a>&lt;/li>
  &lt;/ul>
  &lt;div id="test-swipe-1" class="col s12 blue">Test 1&lt;/div>
  &lt;div id="test-swipe-2" class="col s12 red">Test 2&lt;/div>
  &lt;div id="test-swipe-3" class="col s12 green">Test 3&lt;/div>
        </code></pre>
      </div>

    </div>

    <!-- Table of Contents -->
    <div class="col hide-on-small-only m3 l2">
      <div class="toc-wrapper">
        <div class="buysellads hide-on-small-only">
          <!-- CarbonAds Zone Code -->
          <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=materializecss" id="_carbonads_js"></script>
        </div>
        <div style="height: 1px;">
          <ul class="section table-of-contents">
            <li><a href="#introduction">Introduction</a></li>
            <li><a href="#structure">Structure</a></li>
            <li><a href="#initialization">Intialization</a></li>
            <li><a href="#method">Methods</a></li>
            <li><a href="#options">Options</a></li>
            <li><a href="#preselecting">Preselecting</a></li>
            <li><a href="#external">External Links</a></li>
            <li><a href="#swipeable">Swipeable Tabs</a></li>
          </ul>
        </div>
      </div>
    </div>

  </div>
</div>
